//
//  S2_LabelItem.m
//  Dresshere
//
//  Created by ZhangPeng on 2018/6/12.
//  Copyright © 2018年 张朋. All rights reserved.
//

#import "S2_LabelItem.h"

@interface S2_LabelItem()

@property (strong, nonatomic) NSString *titleStr;

@end

@implementation S2_LabelItem

- (instancetype)initWithFrame:(CGRect)frame titleStr:(NSString *)str
{
    self = [super initWithFrame:frame];
    if (self) {
        self.titleStr = str;
        [self setTitle:str forState:UIControlStateNormal];
        [self setTitleColor:[UIColor colorWithHexString:@"#575757"] forState:UIControlStateNormal];
        self.layer.cornerRadius = self.frame.size.height / 2;
        self.titleLabel.font = [UIFont systemFontOfSize:15];
    }
    return self;
}

- (void)enlarge{
    [self setImage:[UIImage imageNamed:@"filter_x"] forState:UIControlStateNormal];
    [self setBackgroundColor:[UIColor colorWithHexString:@"#5F657B"]];
    [self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
}

- (void)narrow{
    [self setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
    [self setBackgroundColor:[UIColor clearColor]];
    [self setTitleColor:[UIColor colorWithHexString:@"#575757"] forState:UIControlStateNormal];
}

@end
